#-------------------------------------------------
#
# Project created by QtCreator 2022-08-29T06:48:53
#
#-------------------------------------------------

QT       += core gui

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = yinshu_desktop_demo
COMPILER = $$system($$QMAKE_CC -v 2>&1)
TEMPLATE = app

# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
#开发模式，用户模式需要注释预定义YINSHU_DEVELOPER
#DEFINES += YINSHU_DEVELOPER
QMAKE_CXXFLAGS  += -std=c++14
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

contains(QT_ARCH,"arm64"){
    DEFINES -= YINSHU_DEVELOPER
}

contains(DEFINES,YINSHU_DEVELOPER){
    INCLUDEPATH += ../yinshu_sfu_client
    CONFIG += debug_and_release
    contains(QT_ARCH,"x86_64"){
        CONFIG(debug, debug|release){            
            win32:{
                DESTDIR=$$PWD/../out/winx64
                LIBS += $$PWD/../out/winx64/yinshu.dll.lib
            }
            unix: {
                QMAKE_CXXFLAGS  += -Wno-sign-compare -Wno-unused-parameter
                DESTDIR=$$PWD/../out/linux_x64
                LIBS += $$PWD/../out/linux_x64/libyinshu.so
            }
        } else {
            win32: {
                DESTDIR=$$PWD/iseeu_win_x64_sdk/bin/
                LIBS += $$PWD/iseeu_win_x64_sdk/lib/yinshu.dll.lib
            }
            unix:{
                QMAKE_CXXFLAGS  += -Wno-sign-compare -Wno-unused-parameter
                DESTDIR=$$PWD/iseeu_linux_x64_sdk/bin/
                LIBS += $$PWD/iseeu_linux_x64_sdk/bin/libyinshu.so
            }
        }
    }
}else{
    win32: {
        INCLUDEPATH += $$PWD/iseeu_win_x64_sdk/include
        DESTDIR=$$PWD/iseeu_win_x64_sdk/bin/
        LIBS += $$PWD/iseeu_win_x64_sdk/lib/yinshu.dll.lib
    }
    unix:{
        QMAKE_CXXFLAGS  += -Wno-sign-compare -Wno-unused-parameter

        contains(QT_ARCH,"arm64"){
            DEST_ARCH = "arm64_sdk"
        } else {
            DEST_ARCH = "x64_sdk"
        }

        INCLUDEPATH += $$PWD/iseeu_linux_$$DEST_ARCH/include
        DESTDIR=$$PWD/iseeu_linux_$$DEST_ARCH/bin/
        LIBS += $$PWD/iseeu_linux_$$DEST_ARCH/bin/libyinshu.so
    }
}


contains(COMPILER, arm-linux-gnueabihf){
    message("compile for linux,arm-linux-gnueabihf")
}
contains(COMPILER, arm-linux-gnueabihf){
    message("compile for linux,arm-linux-gnueabihf")
}
SOURCES += \
        levent.cpp \
        main.cpp \
        mainwindow.cpp \
        video_widget.cpp \
        grid_manager.cpp \
        callback_funcs.cpp

HEADERS += \
        levent.h \
        mainwindow.h \
        video_widget.h \
        grid_manager.h \
        callback_funcs.h

FORMS += \
        mainwindow.ui
